//
//  ManagerAdapter.m
//  TecentDemo
//
//  Created by leo on 9/14/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "ManagerAdapter.h"
#import "WeiboManager.h"
#import "TencentManager.h"
#import "RenRenManager.h"

static ManagerAdapter *managerAdapter;

@implementation ManagerAdapter


+(id) instance
{
    if (nil==managerAdapter) {
        managerAdapter = [[ManagerAdapter alloc]init];
    }
    return managerAdapter;
    
}

-(BaseManager *) getManager:(int)type
{
    if (2==type) {
        return [WeiboManager instance];
    }
    if (3==type) {
        return [TencentManager instance];
    }
    if (4==type) {
        return [RenRenManager instance];
    }
    return nil;
}

-(WeiboManager*)   getWeiboManager
{
    return [WeiboManager instance];
}

-(TencentManager*) getTencentManager
{
    return [TencentManager instance];
}

-(RenRenManager*)  getRenRenManager
{
    return [RenRenManager instance];
}

@end
